package com.example.infrastructure.persistent.dao;

import com.example.infrastructure.persistent.po.RaffleActivityOrderPO;
import com.example.router.annotation.DBRouter;
import com.example.router.annotation.DBRouterStrategy;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * <p>
 * 抽奖活动单 Mapper 接口
 * </p>
 *
 * @author 三石
 * @since 2024-07-29
 */
@Mapper
@DBRouterStrategy(splitTable = true)
public interface IRaffleActivityOrderDao extends BaseMapper<RaffleActivityOrderPO> {

    @DBRouter(key = "userId")
    void insertOne(RaffleActivityOrderPO raffleActivityOrder);

    @DBRouter
    List<RaffleActivityOrderPO> queryRaffleActivityOrderByUserId(String userId);

}
